Integrand size = 35, antiderivative size = 100 \[ \int \frac {\sqrt {\sec (c+d x)} (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=\frac {2 B \text {arcsinh}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}+\frac {\sqrt {2} (A-B) \text {arctanh}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d} \]
[Out]
Time = 0.27 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4108, 3893, 212, 3886, 221} \[ \int \frac {\sqrt {\sec (c+d x)} (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=\frac {\sqrt {2} (A-B) \text {arctanh}\left (\frac {\sqrt {a} \sin (c+d x) \sqrt {\sec (c+d x)}}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}+\frac {2 B \text {arcsinh}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d} \]
[In]
[Out]
Rule 212
Rule 221
Rule 3886
Rule 3893
Rule 4108
Rubi steps \begin{align*} \text {integral}& = (A-B) \int \frac {\sqrt {\sec (c+d x)}}{\sqrt {a+a \sec (c+d x)}} \, dx+\frac {B \int \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)} \, dx}{a} \\ & = -\frac {(2 (A-B)) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}-\frac {(2 B) \text {Subst}\left (\int \frac {1}{\sqrt {1+\frac {x^2}{a}}} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{a d} \\ & = \frac {2 B \text {arcsinh}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}+\frac {\sqrt {2} (A-B) \text {arctanh}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d} \\ \end{align*}
Time = 0.13 (sec) , antiderivative size = 95, normalized size of antiderivative = 0.95 \[ \int \frac {\sqrt {\sec (c+d x)} (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=\frac {\left (-2 B \arcsin \left (\sqrt {\sec (c+d x)}\right )+\sqrt {2} (-A+B) \arctan \left (\frac {\sqrt {2} \sqrt {\sec (c+d x)}}{\sqrt {1-\sec (c+d x)}}\right )\right ) \tan (c+d x)}{d \sqrt {1-\sec (c+d x)} \sqrt {a (1+\sec (c+d x))}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(231\) vs. \(2(83)=166\).
Time = 7.11 (sec) , antiderivative size = 232, normalized size of antiderivative = 2.32
method | result | size |
default | \(-\frac {\sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \sqrt {\sec \left (d x +c \right )}\, \left (A \sqrt {2}\, \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {2}}{2 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\right )-B \sqrt {2}\, \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {2}}{2 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\right )+B \arctan \left (\frac {\cos \left (d x +c \right )+\sin \left (d x +c \right )+1}{2 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\right )-B \arctan \left (\frac {\cos \left (d x +c \right )-\sin \left (d x +c \right )+1}{2 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\right )\right ) \cos \left (d x +c \right )}{d a \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\) | \(232\) |
parts | \(-\frac {A \sqrt {2}\, \sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {2}}{2 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\right ) \sqrt {\sec \left (d x +c \right )}\, \cos \left (d x +c \right )}{d a \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}+\frac {B \left (\arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {2}}{2 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\right ) \sqrt {2}+\arctan \left (\frac {\cos \left (d x +c \right )-\sin \left (d x +c \right )+1}{2 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\right )-\arctan \left (\frac {\cos \left (d x +c \right )+\sin \left (d x +c \right )+1}{2 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\right )\right ) \sec \left (d x +c \right )^{\frac {3}{2}} \sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \cos \left (d x +c \right )^{2}}{d a \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\) | \(287\) |
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 366, normalized size of antiderivative = 3.66 \[ \int \frac {\sqrt {\sec (c+d x)} (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=\left [-\frac {\sqrt {2} {\left (A - B\right )} \sqrt {a} \log \left (-\frac {\cos \left (d x + c\right )^{2} + \frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{\sqrt {a}} - 2 \, \cos \left (d x + c\right ) - 3}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) - B \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} - \frac {4 \, {\left (\cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right )\right )} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}} + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right )}{2 \, a d}, -\frac {\sqrt {2} {\left (A - B\right )} a \sqrt {-\frac {1}{a}} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {-\frac {1}{a}} \sqrt {\cos \left (d x + c\right )}}{\sin \left (d x + c\right )}\right ) - B \sqrt {-a} \arctan \left (\frac {2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{a \cos \left (d x + c\right )^{2} - a \cos \left (d x + c\right ) - 2 \, a}\right )}{a d}\right ] \]
[In]
[Out]
\[ \int \frac {\sqrt {\sec (c+d x)} (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=\int \frac {\left (A + B \sec {\left (c + d x \right )}\right ) \sqrt {\sec {\left (c + d x \right )}}}{\sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )}}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 567 vs. \(2 (83) = 166\).
Time = 0.57 (sec) , antiderivative size = 567, normalized size of antiderivative = 5.67 \[ \int \frac {\sqrt {\sec (c+d x)} (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \frac {\sqrt {\sec (c+d x)} (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=\int { \frac {{\left (B \sec \left (d x + c\right ) + A\right )} \sqrt {\sec \left (d x + c\right )}}{\sqrt {a \sec \left (d x + c\right ) + a}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\sqrt {\sec (c+d x)} (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=\int \frac {\left (A+\frac {B}{\cos \left (c+d\,x\right )}\right )\,\sqrt {\frac {1}{\cos \left (c+d\,x\right )}}}{\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}} \,d x \]
[In]
[Out]